﻿<%@ Page Title="" Language="C#" MasterPageFile="~/mpEShop.master" AutoEventWireup="true" CodeFile="ForgetPassword.aspx.cs" Inherits="ForgetPassword" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">

<script language="javascript">
    $(document).ready(function() {
        $('#btnSendEmail').button();
    });
    

    function btnSendEmail_onclick() {
        var Email = $f('txtEmail').value;
        var ClientData = new Array();
        ClientData.push('SendEmail');
        ClientData.push(Email);
        forgetpassCallServer(JSON.stringify(ClientData));
    }
    function showError(msg) {
        $('#spnMessage')
        .removeClass('success')
        .addClass('error')
        .html(msg);
    }
    function showSuccess(msg) {
        $('#spnMessage')
        .removeClass('error')
        .addClass('success')
        .html(msg);
    }
    function forgetpassReceive(data) {
    
        if (data != undefined && data != '') { 
            var ServerData=eval('('+data+')');
            var Command=ServerData[0];
            var state=ServerData[1];
            if (Command == 'SendEmail') {
                if (state == 'Success') {
                    showSuccess('Die Email wurde verschickt');
                }
                if (state == 'Fail') {
                    showError(ServerData[2]);
                }
            }        
        }
    }
</script>
<div class="PageCover">

    <table align="center" class="tblForgetPass">
        <tr>
            <td>
                Sie sollten Ihre E-Mail-Adresse für die Zusendung Ihres Kennworts
            </td>
        </tr>
        <tr>
            <td style="text-align:center;">
                <input type="text" id="txtEmail" style="width:330px;"/>
            </td>
        </tr>
        <tr>
            <td style="text-align:center;">
            <input type="button" id="btnSendEmail" value="E-Mail senden" onclick="return btnSendEmail_onclick()" />
            
            </td>
        </tr>
        <tr>
            <td> 
                <span id="spnMessage" class=""></span>
            </td>
        </tr>
    </table>

</div>


</asp:Content>

